using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Aplicacion.Base.WinForm;
using BaseDatos.Comun;
using System.Data;
using BaseDatos;

namespace SCHD
{
    public class CBSedexMArea : CollectionBase, IColeccionBase
    {
        private EBSede _Sede = null;

        public CBSedexMArea(EBSede Sede)
        {
            //_Sede = Sede;
            Refrescar();
        }

        public  void Refrescar()
        { 
                DbParametro[] Parametros = new DbParametro[3];
                Parametros[0] = new DbParametro("pcodsede", _Sede.CodigoSede);
                Parametros[1] = new DbParametro("pcodmare", "");
                Parametros[2] = new DbParametro("popcion", "QRY01");
                DataSet Ds = ConexionBaseDatos.Conexion.CrearDataSet("GETCHDMAREA", Parametros);
                if (Ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow registro in Ds.Tables[0].Rows)
                    {
                        EBMArea Marea = new EBMArea(registro);
                        List.Add(Marea);
                    }
                }
        }


        #region IColeccionBase Members

        public void Agregar(IEntidadBase Objeto)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void Eliminar(IEntidadBase Objeto)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void Imprimir()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void Nuevo()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}
